package com.wf.course.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.utils.page.PageBean;
import com.wf.course.dao.IQuestionMapper;
import com.wf.course.model.comm.Question;
import com.wf.course.service.IQuestionService;

@Service
@Transactional
public class IQuestionServiceImpl implements IQuestionService {

	@Autowired
	private IQuestionMapper mapper;
	
	@Override
	public void getQuestionList(PageBean<Question> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(mapper.getQuestionList(pageBean));
		pageBean.setTotalCount(mapper.getQuestionCount(pageBean));
	}

	@Override
	public void saveQuestion(Question question) {
		// TODO Auto-generated method stub
		mapper.saveQuestion(question);
	}

	@Override
	public void deleteQuestion(Integer id) {
		// TODO Auto-generated method stub
		mapper.deleteQuestion(id);
	}

	@Override
	public Question questionLoad(Integer id) {
		// TODO Auto-generated method stub
		return mapper.questionLoad(id);
	}

	@Override
	public Integer updateQuesiton(Question question) {
		// TODO Auto-generated method stub
		return mapper.updateQuesiton(question);
	}

}
